package com.training1.core.dto;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

public class AccountSystemParamDto {
	
	public static final String B_INCOME_TAX_RATE_KEY = "ZH_B_SF";
	public static final String B_CONSUMER_FUND_ACCOUNTING_KEY = "ZH_B_XF";
	public static final String AGENTS_FIGHT_DEDUCTION_KEY = "ZH_DLS_KS";
	

	@NotNull(message="{module.systemparamdto.incomeTaxRate.notnull}")
	//@Range(min=1,max=100,message="{module.systemparamdto.incomeTaxRate.error}")
	@Pattern(regexp="^[1-9]\\d?|100",message="{module.systemparamdto.incomeTaxRate.error}")
	//@Length(min=1, max=10,message="{module.systemparamdto.incomeTaxRate.length.error}")
	private String incomeTaxRate;
	
	@NotNull(message="{module.systemparamdto.counsumeFundAccounting.notnull}")
	//@Range(min=1,max=100,message="{module.systemparamdto.counsumeFundAccounting.error}")
	@Pattern(regexp="^[1-9]\\d?|100",message="{module.systemparamdto.counsumeFundAccounting.error}")
	//@Length(min=1, max=10,message="{module.systemparamdto.counsumeFundAccounting.length.error}")
	private String counsumeFundAccounting;
	
	@NotNull(message="{module.systemparamdto.agentsFightDeduction.notnull}")
	//@Range(min=1,max=100,message="{module.systemparamdto.agentsFightDeduction.error}")	
	@Pattern(regexp="^[1-9]\\d?|100",message="{module.systemparamdto.agentsFightDeduction.error}")
	//@Length(min=1, max=10,message="{module.systemparamdto.agentsFightDeduction.length.error}")
	private String agentsFightDeduction;
	
	private String incomeTaxRateKey;
	
	private String counsumeFundAccountingKey;
	
	private String agentsFightDeductionKey;
	
	public AccountSystemParamDto() {
		this.incomeTaxRateKey=B_INCOME_TAX_RATE_KEY;
		this.counsumeFundAccountingKey=B_CONSUMER_FUND_ACCOUNTING_KEY;
		this.agentsFightDeductionKey=AGENTS_FIGHT_DEDUCTION_KEY;
	}
	
	
	public String getIncomeTaxRate() {
		return incomeTaxRate;
	}


	public void setIncomeTaxRate(String incomeTaxRate) {
		this.incomeTaxRate = incomeTaxRate;
	}

	public String getCounsumeFundAccounting() {
		return counsumeFundAccounting;
	}


	public void setCounsumeFundAccounting(String CounsumeFundAccounting) {
		counsumeFundAccounting = CounsumeFundAccounting;
	}


	public String getAgentsFightDeduction() {
		return agentsFightDeduction;
	}

	public void setAgentsFightDeduction(String AgentsFightDeduction) {
		agentsFightDeduction = AgentsFightDeduction;
	}


	public String getIncomeTaxRateKey() {
		if(incomeTaxRateKey==null){
			return  B_INCOME_TAX_RATE_KEY;
		}
		return incomeTaxRateKey;
	}

	public void setIncomeTaxRateKey(String incomeTaxRateKey) {
		this.incomeTaxRateKey = incomeTaxRateKey;
	}


	public String getCounsumeFundAccountingKey() {
		if(counsumeFundAccountingKey==null){
			return B_CONSUMER_FUND_ACCOUNTING_KEY;
		}
		return counsumeFundAccountingKey;
	}


	public void setCounsumeFundAccountingKey(String CounsumeFundAccountingKey) {
		counsumeFundAccountingKey = CounsumeFundAccountingKey;
	}

	public String getAgentsFightDeductionKey() {
		if(agentsFightDeductionKey==null){
			return AGENTS_FIGHT_DEDUCTION_KEY;
		}
		return agentsFightDeductionKey;
	}

	public void setAgentsFightDeductionKey(String AgentsFightDeductionKey) {
		agentsFightDeductionKey = AgentsFightDeductionKey;
	}
}
